package com.softa.common.sysconfig.support;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author yangl
 * @date 2018/5/15
 */
@Data
public class DataTableRequest<T> {
    /**
     * 当前页,名字必须为page
     */
    private int page = 1;
    /**
     * 起始行
     */
    private int start = 0;
    /**
     * 每页大小,名字必须为rows
     */
    private int rows = 10;

    private Map<String, Object> params = new HashMap<String, Object>(0);

    public Page<T> startPagePlugin() {
        return new Page<>(page, rows);
    }

}
